﻿namespace Baddies.Events
{
    using System;
    using System.Collections.Generic;
    using System.Diagnostics;
    using System.Linq;
    using System.Text;
    using Microsoft.Xna.Framework.Graphics;    

    /// <summary>
    /// Arguments for the GetGameGxfDevice event.
    /// </summary>
    public class GetGameGfxDeviceArg : EventArgs
    {
        /// <summary>
        /// GraphicsDevice class in the Game class.
        /// </summary>
        private GraphicsDevice graphicsDevice = null;

        /// <summary>
        /// Gets or sets the GraphicsDevice.
        /// </summary>
        /// <value>Reference to the GraphicsDevice.</value>
        public GraphicsDevice GraphicsDevice
        {
            get 
            {
                Debug.Assert(this.graphicsDevice != null, "Graphics device not found!");
                return this.graphicsDevice; 
            }

            set 
            {
                Debug.Assert(this.graphicsDevice == null, "Multiple Graphics devices found!");
                this.graphicsDevice = value; 
            }
        }

        /// <summary>
        /// Text representation of this class.
        /// </summary>
        /// <returns>String with the textual representation of the class.</returns>
        public override string ToString()
        {
            return "GetGfxDevice";
        }
    }
}
